import request from '@/utils/request';

/**
 * @param 采购申请单列表 
 * @returns 
 */
export const getPurchaseRequestFormListApi = (data: any) => {
    return request({
        url: '/system/auxiliaryPurchaseOrder/list',
        method: 'post',
        data: data
    });
};

/**
 * @param 采购申请单编辑
 * @returns 
 */
export const editPurchaseRequestFormApi = (data: any) => {
    return request({
        url: '/system/auxiliaryPurchaseOrder',
        method: 'put',
        data: data
    });
};

/**
 * @param 审批采购申请单
 * @returns 
 */

export const approvalPurchaseRequestFormApi = (data: any) => {
    return request({
        url: '/system/auxiliaryPurchaseOrder/approvalOrder',
        method: 'put',
        data: data
    });
};

/**
 * @package 获取辅材采购单详细信息
 */

export const getPurchaseRequestFormDetailApi = (id: any) => {
    return request({
        url: `/system/auxiliaryPurchaseOrder/${id}`,
        method: 'get'
    });
};

/**
 * @package 删除辅材采购单
 */

export const deletePurchaseRequestFormApi = (ids: any) => {
    return request({
        url: `/system/auxiliaryPurchaseOrder/${ids}`,
        method: 'delete',
    });
};